<%@include file="includes/jspf/header.jspf" %>
<%
String strErrorMsg="";
String strSourceFile = request.getParameter("img").toString();
strWidth = request.getParameter("w").toString();
strHeight = request.getParameter("h").toString();
String SoF = request.getParameter("sof").toString();

strErrorMsg = (request.getParameter("error") != null) ? request.getParameter("error").toString() : "";

strWidth = java.net.URLEncoder.encode(strWidth, "UTF-8");
strHeight = java.net.URLEncoder.encode(strHeight, "UTF-8");
String strSenderName = "";
String strReveiverName = "";
String strReceiverNumbers = "";

try {
    strSenderName = (String) request.getParameter("sendername");
} catch (Exception exGetParameter) {}

try {
    strReveiverName = (String) request.getParameter("receivername");
} catch (Exception exGetParameter) {}

try {
    strReceiverNumbers = (String) request.getParameter("receivernumbers");
} catch (Exception exGetParameter) {}

strSenderName = ((strSenderName == null) || (strSenderName.equalsIgnoreCase(""))) ? "" : strSenderName;
strReveiverName = ((strReveiverName == null) || (strReveiverName.equalsIgnoreCase(""))) ? "" : strReveiverName;
strReceiverNumbers = ((strReceiverNumbers == null) || (strReceiverNumbers.equalsIgnoreCase(""))) ? "" : strReceiverNumbers;
%>
        <div id="errorMsgPlaceHolder"><%=strErrorMsg%></div>
        
        <form name="formPicture" id="formPicture" method="post" action="cardPreview.jsp">


            <div align="center">
                <p class="txt">Please Cutomize your UGreeting card</p>
                <img alt="" src="<%=context_Path%>/renderImage?img=<%=strSourceFile%>&h=<%=strHeight%>&s=0&repo=&w=<%=strWidth%>&cid=<%=request.getParameter("cid").toString()%>"/>
            </div>

            <table align="center">
                <input type="hidden" name="img" value="<%=strSourceFile%>"/>
                <input type="hidden" name="w" value="<%=strWidth%>"/>
                <input type="hidden" name="h" value="<%=strHeight%>"/>
                <input type="hidden" name="cid" value="<%=request.getParameter("cid").toString()%>"/>
                <input type="hidden" name="s" value="0"/>
                <input type="hidden" name="repo" value="CBP"/>
                <input type="hidden" name="sof" value="<%=SoF%>"/>

                <tr align="center" valign="middle">
                    <td colspan="2"><span class="txt">From&nbsp;</span></td>
                </tr>
                <tr align="center" valign="middle">
                    <td colspan="2">
                        <input type="text" name="sendername" id="sendername" value="<%=strSenderName%>" maxlength="30"/>
                    </td>
                </tr>
                <tr align="center" valign="middle">
                    <td colspan="2"><span class="txt">To</span></td>
                </tr>
                <tr align="center" valign="middle">
                    <td colspan="2">
                        <input type="text" name="receivername" id="receivername" value="<%=strReveiverName%>" maxlength="30"/>
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2"><span class="txt">Recipient's Mobile No (e.g. 0333xxxxxxx)</span></td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                        <input type="text" size="15" name="receivernumbers" id="receivernumbers" value="<%=strReceiverNumbers%>" />
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                        <input type="submit" name="Send" id="Send" value="Preview" />
                    </td>
                </tr>
                <tr align="center">
                    <td >&nbsp;</td>
                    <td > </td>
                </tr>
            </table>
        </form>
<%@include file="includes/jspf/footer.jspf" %>
<%
ugb.LogVisit("", "UCARD", "", "", "", "","Ugreeting", request.getQueryString());
//strIP, thisPage, strGsm, strApn, strBrand, strModel, app
%>